@extends('backend::layout')
@section('title',$page_title)
@section('content')
    @component('backend::component.table.table-content')
        @slot('page_title'){{$page_title}}@endslot
        @slot('tools_btn')
            @component('backend::component.form.button')
                @slot('elem') a @endslot
                @slot('title')添加币种@endslot
                @slot('icon') hcl-currency-add @endslot
                @slot('size') sm @endslot
                @slot('href') {{route('d_Currency_create')}} @endslot
            @endcomponent
        @endslot
        @slot('body_content')
            @if($list->isNotEmpty())
                <table class="table table-striped table-bordered">
                    <thead><tr>
                        <th>
                            @component('backend::component.checkbox')
                                @slot('name') ids-all @endslot
                            @endcomponent
                        </th>
                        <th>币种ID</th><th>标识</th><th>标题</th><th>价格</th><th>状态</th><th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($list as $value)
                        <tr>
                            <td>
                                @component('backend::component.checkbox')
                                    @slot('name') id[] @endslot
                                    @slot('class') id @endslot
                                    @slot('value') {{$value->id}} @endslot
                                @endcomponent
                            </td>
                            <td>{{$value->id}}</td>
                            <td>{{$value->name}}</td>
                            <td>{{$value->title}}</td>
                            <td>{{$value->price}}</td>
                            <td>
                                @component("backend::component.switch")
                                    @slot('params'){"url":"{{route('d_Currency_onOff',['id'=>$value->id])}}"} @endslot
                                    @slot('checked') @if($value->status == 1) checked @endif @endslot
                                @endcomponent
                            </td>
                            <td>
                                @component('backend::component.form.button')
                                    @slot('elem') a @endslot
                                    @slot('icon') hcl-edit1 @endslot
                                    @slot('size') sm @endslot
                                    @slot('color') info @endslot
                                    @slot('href') {{route('d_Currency_update',['id'=>$value->id])}} @endslot
                                @endcomponent

                                @component('backend::component.form.button')
                                    @slot('color') danger @endslot
                                    @slot('icon') hcl-remove @endslot
                                    @slot('size') sm @endslot
                                    @slot('class') btn-ajax @endslot
                                    @slot('params') {"url":"{{route('d_Currency_delete',['id'=>$value->id])}}","title":"删除配置","confirm":"true"} @endslot
                                @endcomponent
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            @else
                @component('backend::public.empty_page')
                    @slot('info') 暂时没有币种 @endslot
                @endcomponent
            @endif
        @endslot
    @endcomponent
@endsection